﻿Module ModuloClasesServicios
    Public Class Servicio
        Dim codigo As String
        Dim nombre As String
        Dim precio As Integer
        Dim tieneBono As Boolean
        Dim precioBono As Integer
        Dim sesionesBono As Integer
        Public Function getSesionesBono() As Integer
            Return Me.sesionesBono
        End Function
        Public Function getNombre() As String
            Return nombre
        End Function
        Public Function getPrecio() As Integer
            Return precio
        End Function
        Public Function bonoDisponible() As Boolean
            Return tieneBono
        End Function
        Public Function getPrecioBono() As Integer
            Return precioBono
        End Function

        Public Sub New(ByVal nombre As String, ByVal precio As Single)
            Me.nombre = nombre

            Me.precio = precio
            tieneBono = False
            precioBono = 0
            sesionesBono = 0
        End Sub
        Public Sub New(ByVal nombre As String, ByVal precio As Integer, ByVal sesiones As Integer, ByVal precioBono As Integer)
            Me.nombre = nombre
            Me.precio = precio
            Me.tieneBono = True
            Me.sesionesBono = sesiones
            Me.precioBono = precioBono
        End Sub
    End Class

    Public Class Servicio2
        Dim codigo As String
        Dim nombre As String
        Dim precio As String
        Dim tieneBono As Boolean
        Dim precioBono As String
        Dim sesionesBono As String
        Public Function getSesionesBono() As String
            Return Me.sesionesBono
        End Function
        Public Function getNombre() As String
            Return nombre
        End Function
        Public Function getPrecio() As String
            Return precio
        End Function
        Public Function bonoDisponible() As Boolean
            Return tieneBono
        End Function
        Public Function getPrecioBono() As String
            Return precioBono
        End Function

        Public Sub New(ByVal nombre As String, ByVal precio As String)
            Me.nombre = nombre
            Me.precio = precio
            tieneBono = False
            precioBono = 0
            sesionesBono = 0
        End Sub
        Public Sub New(ByVal nombre As String, ByVal precio As String, ByVal sesiones As String, ByVal precioBono As String)
            Me.nombre = nombre
            Me.precio = precio
            Me.tieneBono = True
            Me.sesionesBono = sesiones
            Me.precioBono = precioBono
        End Sub
    End Class

    Public Class bono
        Dim codigo As String
        Dim servicio As Servicio
        Dim cliente As Cliente
        Dim sesionesDisponibles As Integer
        Public Sub New(ByVal servicio As Servicio, ByVal cliente As Cliente)
            codigo = Now()
            Me.servicio = servicio
            Me.cliente = cliente
            Me.sesionesDisponibles = servicio.getSesionesBono()
        End Sub
    End Class

    Public Class lineaDetalle
        Dim Servicio As Servicio
        Dim concepto As String
        Dim unidades As Integer
        Dim precio As Single
        Dim canjearBono As Boolean
        Public Sub New(ByVal servicio As Servicio, ByVal unidades As Integer, ByVal canjearBono As Boolean)
        End Sub
        Public Overrides Function toString() As String
            Return ""
        End Function

    End Class

    Public Class Ticket
        Dim dia As Date
        Dim importeTotal As Single
        Dim cliente As Cliente
        Dim lineaDetalle() As lineaDetalle
    End Class
End Module
